SwappableImage.opIndex

Get a pixel given the position.

  1. Color opIndex(size_t x, size_t y)
  2. Color opIndex(size_t offset)
    struct SwappableImage(Color)
    @nogc @safe
    Color
    opIndex
    (
    size_t offset
    )
    if (
    isColor!Color
    )

Parameters

offset size_t

The offset of the pixel

Return Value

Type: Color

The pixel color at point.

Throws

If offset coordinate is outside of the image boundary.

See Also

getPixelAtOffset

Meta